<template>
    <div class="category">
        <h3>{{title}}</h3>
        <!-- <ul>
            <li v-for="(item,index) in listData" :key="index">{{item}}</li>
        </ul> -->
        <slot :youxi="games">不传时显示1</slot>
    </div>
</template>

<script>
export default {
  name: "CategoryComponent",
  data() {
    return {
      games: ["塞尔达", "马里奥", "植物VS僵尸", "黑悟空", "原神"],
    };
  },
  props:[
    'title','listData'
  ]
};
</script>

<style scoped>
.category{
    background-color: skyblue;
    width: 200px;
    height: 300px;
}
.category h3{
    background-color: orange;
    text-align: center;
}
.category img{
    width: 100px;
}
</style>
